# coding:utf-8

from tornado.web import RequestHandler


class BaseHandler(RequestHandler):
	def initialize(self):
		self.session = self.application.DB_Session()

	def on_finish(self):
		self.session.close()

	def get_current_user(self):
		return self.get_secure_cookie("sharer")